package com.news.news.web;

import com.news.news.modle.Like;
import com.news.news.service.UserLikeService;
import com.news.news.util.CommonResult;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * 收藏
 * type:
 */
@RestController
@RequestMapping(path = "/userApi/LikeCtl")
public class UserLikeController {
    @Resource
    UserLikeService likeService;
    /**
     * 获取用户点赞信息
     * @param
     * @return
     */
    @RequestMapping(value = "/LikeList")
    public CommonResult likeList(@RequestHeader("userToken") String token) {
        List<Like> list = likeService.likeList(token);
        CommonResult commonResult=new CommonResult(200,list,"成功");
        return commonResult;
    }
}
